#{extends 'main.html' /} #{set title:'REMS' /}
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=windows-1250">
        <title>REMS</title> 
    </head>
    <body>
        <div id="header"></div> 
        <div id="top">
        	<div id="menu" class="menu">
        		<ul>
        			<li><a href="@{UserConfigController.index()}">BENUTZERKONFIGURATION</a></li>
        			<li><a href="@{NodeConfigController.nodes()}">NODES</a></li>
        			<li><a href="@{MPointConfigController.mpoints()}">MESSPUNKTE</a></li>
        			<li><a href="@{SensorConfigController.sensors()}">SENSOREN</a></li>
        		</ul>
        		<img type="image/png" align="right" src="@{'/public/images/rems_web.png'}">
        	</div>
        </div>
        <div id="middle">
        	<div id="content"> 
        	    <h1>Benutzerkonfiguration</h1>  
	       		<p>
	       			<ul>
	       				<li><a href="@{UserConfigController.insertDefaultUserConfig()}">Laden der Stadardwerte</a></li>
	       				<li><a href="@{UserConfigController.runValidationjob()}">Einmaliges Starten des Validation Job f&uuml;r alle Messpunkte</a></li>
	       			</ul>
	        	</p>    		
	        	#{if flash.error}
    			<p class="error">${flash.error}</p>
				#{/if}
	        	<p>
					<table cellspacing='0'>
						<thead>
							<tr>
								<td>Schl&uuml;ssel</td>
								<td>Beschreibung</td>
								<td>Wert</td>
								<td>Einheit</td>
								<td></td>
							</tr>
						</thead>
						<tbody>
		        			#{list userConfigList, as:'userconfig'}
							#{form @UserConfigController.setPropertyValue(key, value)}
							<tr>
								<td><input type="text" size="30" name="key" value="${userconfig.getPropertyKey()}" id="key" readonly style="border: none"></td>
								<td><input type="text" size="30" value="${userconfig.getDescription()}" id="key" readonly style="border: none"></td>
								<td><input type="text" size="10" name="value" value="${util.UnitConverter.convertTFValuetoNormValue(userconfig.getPropertyKey(),userconfig.getPropertyValue())}" id="value"></td>
								<td><input type="text" size="10" name="unit" value="${util.UnitConverter.getUnit(userconfig.getPropertyKey())}" readonly style="border: none"></td>
								<td><input type="submit" value="Speichern"></td>
							</tr>
							#{/form}
							#{/list}
						</tbody>
					</table>
	        	</p>   	
        	</div>
        </div>  
        <div id="bottom"><p class="footer">Robust Environment Monitoring System</p></div>   
    </body>        
</html>